<!--<div class="box">
  <div class="box-heading"><?php echo $heading_title; ?></div>
  <div class="box-content">
    <ul class="box-category">
      <?php foreach ($categories as $category) { ?>
      <li>
        <?php if ($category['category_id'] == $category_id) { ?>
        <a href="<?php echo $category['href']; ?>" class="active"><?php echo $category['name']; ?></a>
        <?php } else { ?>
        <a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
        <?php } ?>
        <?php if ($category['children']) { ?>
        <ul>
          <?php foreach ($category['children'] as $child) { ?>
          <li>
            <?php if ($child['category_id'] == $child_id) { ?>
            <a href="<?php echo $child['href']; ?>" class="active"> - <?php echo $child['name']; ?></a>
            <?php } else { ?>
            <a href="<?php echo $child['href']; ?>"> - <?php echo $child['name']; ?></a>
            <?php } ?>
          </li>
          <?php } ?>
        </ul>
        <?php } ?>
      </li>
      <?php } ?>
    </ul>
  </div>
</div>-->

<div class="accordion" id="accordion2">
    <?php foreach ($categories as $category) {
     //var_dump($category);
     //die;
     ?>
    <div class="accordion-group boxshadow">
        <div class="accordion-heading">
            <a class="accordion-toggle expanded" data-toggle="collapse" data-target="#collapse<?php echo $category['category_id'] ?>" href="#">
                <?php echo $category['name']; ?>
            </a>
        </div>
        <ul id="collapse<?php echo $category['category_id'] ?>" class="accordion-body in collapse" style="height: auto;">
            <?php foreach($category['products'] as $product) { ?>
                <li class="accordion-inner">
                    <a for="cb8" class="checkbox field menu-item" href="<?php echo $product['href'] ;?>">
                        <strong><?php echo $product['name']; ?></strong>
                    </a>
                </li>
            <?php } ?>
        </ul>
    </div>
    <?php } ?>
</div>
